//package com.example.lcqexcel.ckp;
//
//import com.alibaba.excel.constant.OrderConstant;
//import com.alibaba.excel.metadata.data.WriteCellData;
//import com.alibaba.excel.util.BooleanUtils;
//import com.alibaba.excel.write.handler.CellWriteHandler;
//import com.alibaba.excel.write.handler.context.CellWriteHandlerContext;
//import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder;
//import com.alibaba.excel.write.metadata.style.WriteCellStyle;
//import org.apache.poi.ss.usermodel.CellStyle;
//
///**
// * @ClassName CkpStyleHandler
// * @Description
// * @Author lichuanqi
// * @Date 2022/3/26 12:58
// * @Version 1.0
// **/
//public class CkpStyleHandler implements CellWriteHandler {
//    @Override
//    public int order() {
//        return OrderConstant.FILL_STYLE;
//    }
//
//    @Override
//    public void afterCellDispose(CellWriteHandlerContext context) {
//        if (BooleanUtils.isTrue(context.getIgnoreFillStyle())) {
//            return;
//        }
//
//        WriteCellData<?> cellData = context.getFirstCellData();
//        if (cellData == null) {
//            return;
//        }
//        WriteCellStyle writeCellStyle = cellData.getWriteCellStyle();
//        CellStyle originCellStyle = cellData.getOriginCellStyle();
//        if (writeCellStyle == null && originCellStyle == null) {
//            return;
//        }
//        WriteWorkbookHolder writeWorkbookHolder = context.getWriteWorkbookHolder();
//        context.getCell().setCellStyle(writeWorkbookHolder.createCellStyle(writeCellStyle, originCellStyle));
//    }
//}
